翻訳と辞書
Words near each other
・ Peterson MAP-3 Medena
・ Peterson Mill, California
・ Peterson Occénat
・ Peterson olefination
・ Peterson Patriot
・ Peterson Peçanha
・ Peterson Pipes
・ Peterson Ridge
・ Peterson Rosa
・ Peterson Schools
・ Peterson Toscano
・ Peterson Township, Clay County, Iowa
・ Peterson v Minister of Safety & Security
・ Peterson Zah
・ Peterson's
Peterson's algorithm
・ Peterson's chinchilla mouse
・ Peterson's free-tailed bat
・ Peterson's long-fingered bat
・ Peterson's Magazine
・ Peterson, Alabama
・ Peterson, Indiana
・ Peterson, Iowa
・ Peterson, Kansas
・ Peterson, Minnesota
・ Peterson, Saskatchewan
・ Peterson, Utah
・ Peterson-Dumesnil House
・ Peterson–Stein formula
・ Petersroda


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Peterson's algorithm : ウィキペディア英語版
Peterson's algorithm
Peterson's algorithm (AKA Peterson's solution) is a concurrent programming algorithm for mutual exclusion that allows two processes to share a single-use resource without conflict, using only shared memory for communication. It was formulated by Gary L. Peterson in 1981.〔G. L. Peterson: "Myths About the Mutual Exclusion Problem", ''Information Processing Letters'' 12(3) 1981, 115–116〕 While Peterson's original formulation worked with only two processes, the algorithm can be generalized for more than two,〔As discussed in ''Operating Systems Review'', January 1990 ("Proof of a Mutual Exclusion Algorithm", M Hofri).〕 as shown below.
== The algorithm ==
The algorithm uses two variables, ''flag'' and ''turn''. A ''flag()'' value of ''true'' indicates that the process ''n'' wants to enter the critical section. Entrance to the critical section is granted for process P0 if P1 does not want to enter its critical section or if P1 has given priority to P0 by setting ''turn'' to 0.

// critical section
...
// end of critical section
flag() = false;

| style="text-align:left"|

P1: flag() = true;
P1_gate: turn = 0;
while (flag() && turn == 0)

// critical section
...
// end of critical section
flag() = false;

|}

The algorithm does satisfy the three essential criteria to solve the critical section problem, provided that changes to the variables turn, flag(), and flag() propagate immediately and atomically. The while condition works even with preemption.〔
The three criteria are mutual exclusion, progress, and bounded waiting.〔Silberschatz. Operating Systems Concepts: Seventh Edition. John Wiley and Sons, 2005., Pages 194〕
Since turn can take on one of two values, it can replaced by a single bit, meaning that the algorithms requires only three bits of memory.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Peterson's algorithm」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.